const { eval_code } = require("./share_data");
const { whisper, vital, getPrint, warn, error } = require("../utils/log_tool");
const { BaseCommand } = require("./base");

class EvalCommand extends BaseCommand {
    async execute() {
        const data = this.selfData;
        const code = data?.code;
        const result = eval_code(code);
        return result;
    }

    getRequiredParams() {
        return ["code"];
    }
}

module.exports = {
    EvalCommand,
};
